home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Audio / Patchmix / XWindowsSource / tree.h < prev    next >
C/C++ Source or Header  |  1992-03-28  |  856b  |  41 lines

  1. /*  $Header: tree.h,v 1.1 90/08/27 17:11:24 mara Exp $" 
  2.  *
  3.  *  tree.h
  4.  *
  5.  *  Written by Mara Helmuth
  6.  *
  7.  *  Description: Tree class for Cmix X graphical interface
  8.  * 
  9.  *  $Log:    tree.h,v $
  10.  * Revision 1.1  90/08/27  17:11:24  mara
  11.  * Initial revision
  12.  * 
  13.  * Revision 1.2  90/03/01  20:10:33  mara
  14.  * *** empty log message ***
  15.  * 
  16.  */
  17.  
  18. class s_node {
  19.     friend class ugen_tree;
  20.     private:
  21.         s_node *left,*right;
  22.         int contents;
  23. };
  24.  
  25. // ugen_tree stores indexes to ugen array
  26. class ugen_tree {
  27.     private:
  28.         s_node* root;
  29.         int size;
  30.         getinputtype get_left, get_right;
  31.         unit_generator unit_gen;
  32.     public:
  33.         ugen_tree(int s, int out_ugen, getinputtype l, getinputtype r); 
  34.         void process_ugen(int p, int l, int r);
  35.         void insert(s_node* parent);
  36.         s_node* return_root() { return root; };
  37.         void clear(s_node* n = 0,int first = 1);
  38.         ~ugen_tree() { clear(); };
  39. };
  40.  
  41.